package com.ericsson.rm.dao.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.ericsson.rm.model.ResourceDetail;
import com.ericsson.rm.response.ResourceProjectResponse;

public interface ResourceDetailDaoRepository extends JpaRepository<ResourceDetail, String> {
	
	@Query("select R from ResourceDetail R JOIN R.resourceSkillDetails RS where R.roleDetail.jobStage=:jobStage and RS.skillDetail.skillId=:skillId")
	List<ResourceProjectResponse> searchResourceByJobStageAndSkillId(@Param("jobStage") String jobStage, @Param("skillId") String skillId);
	
	
}
